package com.wan37.logic.service.impl;

import com.wan37.logic.dao.UserItemDao;
import com.wan37.logic.domain.entity.UserItemDO;
import com.wan37.logic.service.UserItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author : luoyong
 * @date : 2020-06-17 15:35
 **/
@Service("userItemService")
public class UserItemServiceImpl implements UserItemService {

    @Autowired
    private UserItemDao userItemDao;

    @Override
    public List<UserItemDO> getUserItemDOsByUserId(String userId) {
        return userItemDao.getUserItemDOByUserId(userId);
    }

    @Override
    public boolean update(UserItemDO userItemDO) {
        return userItemDao.update(userItemDO);
    }

    @Override
    public boolean save(UserItemDO userItemDO) {
        return userItemDao.add(userItemDO);
    }

    @Override
    public boolean delete(UserItemDO userItemDO) {
        return delete(userItemDO);
    }
}
